package com.fqgj.xjd.user.dao;

import com.fqgj.common.base.BaseMapper;
import com.fqgj.xjd.user.entity.UserThirdPartEntity;

/**
 * User: sm
 * Date: 2018-04-12
 * Time: 16:39:21.306
 */

public interface UserThirdPartDao extends BaseMapper<UserThirdPartEntity> {

    /**
     * @return
     */
    Integer insertWithCustomId(UserThirdPartEntity userThirdPartEntity);

    /**
     * @param openId
     * @return
     */
    UserThirdPartEntity selectOneByOpenId(String openId);

    /**
     * 通过userCode获取
     * @param userCode
     * @return
     */
    UserThirdPartEntity selectOneByUserCode(String userCode);

    /**
     * 根据userCode更新openId
     */
    void updateOpenIdByUserCode(String userCode, String openId);

    /**
     * 根据openId更新userCode
     */
    void updateUserCodeByOpenId(String userCode, String openId);
}